package org.zpmis.domain.customer.service.impl;

import org.zpmis.domain.customer.dao.IntentionMapper;
import org.zpmis.domain.customer.model.Intention;
import org.zpmis.domain.customer.service.IntentionService;
import org.zpmis.common.service.AbstractService;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.transaction.annotation.Transactional;
import org.zpmis.domain.customer.vo.IntentionEfficientVo;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


/**
 * Created with CodeGenerator
 * Description:
 * @author  Yang
 * Date: 2021-6-2
 * Time: 14:48:50
 */
@Service
@Transactional
public class IntentionServiceImpl extends AbstractService<Intention> implements IntentionService {

    @Resource
    private IntentionMapper intentionMapper;

    @Override
    public Long getIntentionCount(Long startTime,Long endTime) {
        Map<String,Object> param = new HashMap<>();
        param.put("startTime",startTime);
        param.put("endTime",endTime);
        return intentionMapper.getIntentionCount(param);
    }

    @Override
    public List<IntentionEfficientVo> getIntentionEfficient(Long startTime, Long endTime) {
        Map<String,Object> param = new HashMap<>();
        param.put("startTime",startTime);
        param.put("endTime",endTime);
        return intentionMapper.getIntentionEfficient(param);
    }
}
